#include <QtGui/QApplication>
#include <QDeclarativeContext>
#include "qmlapplicationviewer.h"
#include "broadCaster.h"
#include "xbmcQtClient.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));
    BroadCaster broadCaster; // udp broadcaster
    XbmcQtClient xbmcClient; // xbmc remote code sender
    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/WOLMeUp/main.qml"));
    viewer.showExpanded();
    viewer.rootContext()->setContextProperty("BroadCaster", &broadCaster); // expose to qml
    viewer.rootContext()->setContextProperty("XbmcQtClient", &xbmcClient); // expose to qml

    return app->exec();
}
